#include <iostream.>
using namespace std;
int main()
{
int K;
int N;
int Otvet;
{
cout << "K=" ;
cin >>K;
N=6;
Otvet = ((((K-1)%7)+N-1)%7)+1 ;
}
cout <<"Otvet " << Otvet << endl;
return 0;
}
